if [ -e /dev/tcaicard0 ];then
        AICARD_NUM=`ls /dev/tcaicard* | wc -l`
else
        echo "No card !"
        exit 1
fi

PSY_AICARD_NUM_1=`expr $AICARD_NUM / 3`

if [[ $PSY_AICARD_NUM_1 < 4 ]];
then
	echo "unknown card!"
	echo "card num is $PSY_AICARD_NUM_1"
	echo "test FAILED"
	exit 1
fi

let PSY_AICARD_NUM=${PSY_AICARD_NUM_1}-1

CURTIME=`date +%m%d%H%M`
echo $CURTIME

for card_id in `seq 0 ${PSY_AICARD_NUM}`
do
    sh single_3core_card.sh $card_id &
done

wait

echo "app finished"
